<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>箭头函数-作为函数使用</title>
    </head>
    <body>
        <h1>箭头函数-不绑定arguments</h1>
        <p>来源:<a href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_functions">https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_functions</a></p>
        <h2>作为函数使用</h2>
        <p>由于 this 已经在词法层面完成了绑定，通过 call() 或 apply() 方法调用一个函数时，只是传入了参数而已，对 this 并没有什么影响：</p>
        <script>
            'use strict';
            var obj = {
              i: 10,
              b: () => console.log(this.i, this),
              c: function() {
                console.log( this.i, this)
              }
            }
            obj.b() // undefined Window {}
            obj.c() // 10, Obejct {...}
            // console.log(); 
            // console.log(); 
        </script>
    </body>
</html>